package com.system.permissiondemo.mapper;

import com.system.permissiondemo.beans.PageQuery;
import com.system.permissiondemo.entity.SysUser;
import com.system.permissiondemo.entity.SysUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface SysUserMapper {
    long countByExample(SysUserExample example);

    int deleteByExample(SysUserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    List<SysUser> selectByExample(SysUserExample example);

    SysUser selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") SysUser record, @Param("example") SysUserExample example);

    int updateByExample(@Param("record") SysUser record, @Param("example") SysUserExample example);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    SysUser findByKeyword(@Param("keyword")String keyword);

    Integer countByMail(@Param("mail")String mail, @Param("userId")Integer userId);

    Integer countByTelephone(@Param("Telephone")String Telephone, @Param("userId")Integer userId);

    Integer countByDeptId(@Param("deptId")Integer deptId);

    List<SysUser> getPageByDeptId(@Param("deptId")Integer deptId, @Param("page")PageQuery page);
}